home *** CD-ROM | disk | FTP | other *** search
- /*
- ** vgetca.c
- **
- ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
- ** Redistributed by permission.
- */
-
- #include "pictor.h"
-
- /*
- ** Returns the character/attribute from the current video position.
- */
- int vgetca(void)
- {
- int retval;
-
- _asm push ds
- _asm mov si,_PL_offset
- _asm cmp _PL_snowcheck,FALSE
- _asm mov ax,_PL_segment
- _asm mov ds,ax
- _asm je direct
- _asm mov dx,CGA_STATUS_PORT
- scan_lo:
- _asm in al,dx
- _asm shr al,1
- _asm jc scan_lo
- _asm cli
- scan_hi:
- _asm in al,dx
- _asm shr al,1
- _asm jnc scan_hi
- _asm lodsw
- _asm sti
- _asm jmp end_vgetca
- direct:
- _asm lodsw
- end_vgetca:
- _asm pop ds
- _asm mov _PL_offset,si
- _asm mov retval,ax
-
- return(retval);
-
- } /* vgetca */
-